<template>
  <iframe :src="iframeUrl" v-if="iframeUrl"
          style="width: 100%;height: 100%;position: absolute;border: 0;z-index: 100"></iframe>
</template>

<script lang="ts" setup>
import {useRouter} from "vue-router";
import {getAccessToken, getRefreshToken} from "@/utils/auth";

const router = useRouter();
const iframeUrl = ref('');
onMounted(() => {
  let path = router.currentRoute.value.fullPath
  console.log(path, 'path')
  let token = {
    accessToken: getAccessToken(),
    refreshToken: getRefreshToken()
  }
   // iframeUrl.value = 'http://123.249.25.206:8084' + path + '?token=' + encodeURIComponent(JSON.stringify(token))
 iframeUrl.value = 'http://localhost:81' + path + '?token=' + encodeURIComponent(JSON.stringify(token))
})
</script>

<style scoped>

</style>
